import request from '../utils/request'
import { useAuthStore } from '@/stores/auth.store'
// 用户登录
export function login(data) {
    return request({
        url: '/auth/login',
        method: 'post',
        data
    })
}

// 获取当前用户信息
export function getCurrentUser() {
    return request({
        url: '/auth/me',
        method: 'get'
    })
}

// 用户注销
export function logout() {
    return request({
        url: '/auth/logout',
        method: 'post'
    })
}